<section class="login-page">
  <div class="login-box">
    <div class="animated-banner" #animatedBanner>
      @for(item of bgList;track $index){
      <div class="layer">
        @if($index === 23){
        <video #video loop muted src="/assets/1.webm" playsinline="" width="180" height="100" data-height="100"
          data-width="180"></video>
        }@else {
        <img [src]="item" data-height="187" data-width="2000" height="187" width="2000">
        }
      </div>
      }
    </div>

    <div class="animated-banner2" #animatedBanner2>
      @for(item of bgList;track $index){
      <div class="layer">
        @if($index === 23){
        <video #video2 loop muted src="/assets/1.webm" playsinline="" width="180" height="100" data-height="100"
          data-width="180"></video>
        }@else {
        <img [src]="item" data-height="187" data-width="2000" height="187" width="2000">
        }
      </div>
      }
    </div>
    <!-- 登录表单 -->
    @if (isLogin) {
    <form class="login-form" nz-form [formGroup]="validateForm" (ngSubmit)="submitForm('login')">
      <h1></h1>
      <nz-form-item>
        <nz-form-control nzErrorTip="请输入用户名">
          <nz-input-group nzPrefixIcon="user">
            <input type="text" nz-input formControlName="userName" placeholder="用户名" />
          </nz-input-group>
        </nz-form-control>
      </nz-form-item>
      <nz-form-item>
        <nz-form-control nzErrorTip="请输入密码">
          <nz-input-group nzPrefixIcon="lock">
            <input type="password" nz-input formControlName="password" placeholder="密码" />
          </nz-input-group>
        </nz-form-control>
      </nz-form-item>
      <button nz-button class="login-form-button login-form-margin" [nzType]="'primary'">登 录</button>
      <div class="register-box">
        <span class="register-btn" (click)="_register()">去注册</span>
      </div>
    </form>
    }@else {
    <form class="login-form" nz-form [formGroup]="validateForm" (ngSubmit)="submitForm('register')">
      <h1></h1>
      <nz-form-item>
        <nz-form-control nzErrorTip="请输入用户名">
          <nz-input-group nzPrefixIcon="user">
            <input type="text" nz-input formControlName="userName" placeholder="用户名" />
          </nz-input-group>
        </nz-form-control>
      </nz-form-item>
      <nz-form-item>
        <nz-form-control nzErrorTip="请输入密码">
          <nz-input-group nzPrefixIcon="lock">
            <input type="password" nz-input formControlName="password" placeholder="密码" />
          </nz-input-group>
        </nz-form-control>
      </nz-form-item>
      <button nz-button class="login-form-button login-form-margin" [nzType]="'primary'">注 册</button>
      <div class="register-box">
        <span class="register-btn" (click)="_login()">去登录</span>
      </div>
    </form>
    }
  </div>
</section>